<template>
    <div class="block text-center">
        <el-carousel :interval="4000" type="card" height="500px">
            <el-carousel-item v-for="(item, index) in swiperlist" :key="index">
                <h3 class="small justify-center" text="2xl"><img :src=item.img width="100%" height="500px"></h3>
            </el-carousel-item>
        </el-carousel>
        <!-- <el-carousel height="800px" motion-blur>
            
        </el-carousel> -->
    </div>
</template>


<script>
import axios from 'axios';

export default {
    data() {
        return {
            swiperlist: []
        }
    },
    mounted() {
        axios.get('swiper.json').then(res=>{
            this.swiperlist = res.data.swiperlist
            // console.log(res)
        })
    }
}
</script>

<style scoped>
.demonstration {
  color: var(--el-text-color-secondary);
}

.el-carousel__item h3 {
  color: #475669;
  line-height: 200px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>